<template>
	<view>
		<u-cell-group>
			<u-cell v-for="(item,index) in policyList" :key="index" :label="item.value" @click='toDetail(item)'>
				<view slot="title">
					<view class="u-slot-title">
						<u-tag text="政策" size="mini" bgColor='#31c698' borderColor='#31c698'>
						</u-tag>
						<text class="u-cell-text">{{item.title}}</text>
					</view>
				</view>
				<view slot="label" class="u-cell-label">
					<text>{{item.value}}</text>
				</view>
			</u-cell>
		</u-cell-group>
		<switch-page :totalPages='5' :currentPage='5'></switch-page>
	</view>
</template>

<script>
	import switchPage from '../../components/switchPage.vue'
	export default {
		components: {
			switchPage
		},
		data() {
			return {
				policyList: [{
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区动态标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, {
					title: '园区政策标题',
					value: '2021-05-12'
				}, ]
			}
		},
		methods: {
			toDetail(item) {
				uni.navigateTo({
					url: '/pages/tabbar/park/detail/detail'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.u-slot-title {
		display: flex;
	}

	.u-cell-text {
		margin-left: 10upx;
		font-weight: bold;
		line-height: 40upx;
		font-size: 16px;
	}

	.u-cell-label {
		font-size: 14px;
		margin-top: 14upx;
		color: #888;
		text-align: right;
	}
</style>
